package com.kika.obwiki.utils;

import java.util.Random;

/**
 * 盐值工具类
 */
public class SaltUtil {
  /**
   * 生成16位随机盐
   * 
   * @return 盐字符串
   */
  public static String getSalt() {
    StringBuilder sb = new StringBuilder();
    Random random = new Random();
    for (int i = 0; i < 16; i++) {
      sb.append((char) (random.nextInt(26) + 97));
    }
    return sb.toString();
  }
}